IntelliJ Platform/IntelliJ Platform UI.ipynb (97 lines of code) (raw):

{ "cells": [ { "metadata": {}, "cell_type": "markdown", "source": [ "# IntelliJ Platform UI\n", "\n", "This simple notebook presents how to run the Message Dialog within the currently running IDE." ] }, { "cell_type": "code", "metadata": { "collapsed": true, "ExecuteTime": { "end_time": "2025-07-10T11:11:30.104838Z", "start_time": "2025-07-10T11:11:29.933659Z" } }, "source": "%use intellij-platform", "outputs": [ { "data": { "text/plain": [ "IntelliJ Platform integration is loaded" ] }, "metadata": {}, "output_type": "display_data" } ], "execution_count": 1 }, { "metadata": { "ExecuteTime": { "end_time": "2025-07-10T11:11:31.334811Z", "start_time": "2025-07-10T11:11:30.113758Z" } }, "cell_type": "code", "source": [ "import com.intellij.openapi.ui.Messages\n", "\n", "runInEdt {\n", " Messages.showMessageDialog(\n", " null,\n", " \"This is a modal dialog message\",\n", " \"Dialog Title\",\n", " Messages.getInformationIcon()\n", " )\n", " throw Exception(\"Oooops!\")\n", "}" ], "outputs": [ { "ename": "org.jetbrains.kotlinx.jupyter.api.exceptions.ReplUnwrappedExceptionImpl", "evalue": "Oooops!", "output_type": "error", "traceback": [ "Oooops!" ] } ], "execution_count": 2 }, { "metadata": {}, "cell_type": "code", "source": "println(\"I won't be printed\")", "outputs": [], "execution_count": null } ], "metadata": { "kernelspec": { "display_name": "Kotlin", "language": "kotlin", "name": "kotlin" }, "language_info": { "name": "kotlin", "version": "2.2.20-dev-4982", "mimetype": "text/x-kotlin", "file_extension": ".kt", "pygments_lexer": "kotlin", "codemirror_mode": "text/x-kotlin", "nbconvert_exporter": "" }, "ktnbPluginMetadata": { "sessionRunMode": "IDE_PROCESS" } }, "nbformat": 4, "nbformat_minor": 0 }